//
//  OrderTableViewCell.swift
//  Pods
//
//  Created by eme on 2017/3/28.
//
//

import UIKit
import CommonCore
import RickonCore

class OrderTableViewCell: UITableViewCell {
    
    @IBOutlet weak var goodsImageView: UIImageView!
    @IBOutlet weak var goodsNameLabel: UILabel!
    @IBOutlet weak var priceLabel: UILabel!
    @IBOutlet weak var goodsStatus_Label: UILabel!
    @IBOutlet weak var numLabel: UILabel!
    @IBOutlet weak var status_Label: UILabel!
    @IBOutlet weak var LineView: UIView!
    var item:ArrayModel?{
        didSet{
            if let model = item{
                
                if model.detailstatus == "2"
                {
                    self.numLabel.text = "×\(model.detailrnumber)"
                    self.status_Label.text = "退款成功"
                }
                else if model.detailstatus == "4"
                {
                    self.numLabel.text = "×\(model.detailrnumber)"
                    self.status_Label.text = "售后标记"
                }else{
                    self.numLabel.text = ""
                    self.status_Label.text = "×\(model.detailrnumber)"
                }
                if model.pdtype != "0"{
                    
                    self.goodsStatus_Label.text = ""
                    
                }else{
                    
                    self.goodsStatus_Label.text =  model.standard
                }
                self.goodsNameLabel.text = model.pdname
                self.priceLabel.text = "\(model.shprice.getPriceStr())"
                self.goodsImageView.setUrlImage(model.img1)
            }
        }
        
    }
    
    override func awakeFromNib() {
        super.awakeFromNib()
        self.LineView.backgroundColor = Theme.v.separate_Line
        self.goodsNameLabel.normal_fontSize(13)
        self.goodsStatus_Label.normal_fontSize(13)
        self.priceLabel.normal_fontSize(13)
        self.numLabel.normal_fontSize(13)
        self.status_Label.normal_fontSize(13)
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }
    
}
